package com.atguigu.jxc.controller;


// 商品报损商品controller层

import com.atguigu.jxc.domain.ServiceVO;
import com.atguigu.jxc.entity.DamageList;
import com.atguigu.jxc.service.DamageListGoodsService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/damageListGoods")
public class DamageListGoodsController {

    @Autowired
    DamageListGoodsService damageListGoodsService;


    @RequestMapping("/save")
    @RequiresPermissions(value = "商品报损")
    public ServiceVO save (DamageList damageList,String damageListGoodsStr){
        return damageListGoodsService.save(damageList,damageListGoodsStr);
    }

    @RequestMapping("/list")
    @RequiresPermissions(value = "报损报溢查询")
    public Map<String,Object> list (String sTime,String eTime){
        return damageListGoodsService.list(sTime,eTime);
    }


    @RequestMapping("/goodsList")
    @RequiresPermissions(value = "报损报溢查询")
    public Map<String,Object> goodsList (Integer damageListId){
        return damageListGoodsService.goodsList(damageListId);
    }


}
